<?php

class Controller extends CController {

    public $layout = 'main';
    public $menu = array();
    public $breadcrumbs = array();

    public function init() {
        if (user()->isGuest && $this->id !== 'site')
            $this->redirect(array('site/login'));
    }

}